{extend name="common/layout" /}

{block name="title"}角色（权限）管理{/block}
{block name="content"}
<div id="content">

    <div class="page-header">
        <div class="container-fluid">
            <div class="pull-right">
                <button type="submit" form="form-create" data-toggle="tooltip" title="保存" class="btn btn-primary">
                    <i class="fa fa-save"></i>
                </button>
                <a href="{:url('index')}" data-toggle="tooltip" title="取消" class="btn btn-default">
                    <i class="fa fa-reply"></i>
                </a>
            </div>
            <h1>角色（权限）{if condition="is_null($id)"}创建{else/}修改{/if}</h1>
            <ul class="breadcrumb">
                <li>
                    <a href="/back/site/index.html">首页</a>
                </li>
                <li>
                    <a href="/back/brand/index.html">角色（权限）</a>
                </li>
            </ul>
        </div>
    </div>
    <div class="container-fluid">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">
                    <i class="fa fa-pencil"></i>
                    角色（权限）{if condition="is_null($id)"}创建{else/}修改{/if}
                </h3>
            </div>
            <div class="panel-body">
                <form action="{:url('set')}" method="post" enctype="multipart/form-data" id="form-create"
                      class="form-horizontal">
                    <ul class="nav nav-tabs">
                        <li class="active">
                            <a href="#tab-general" data-toggle="tab">基本信息</a>
                        </li>
                    </ul>
                    <div class="tab-content">
                        <div class="tab-pane active" id="tab-general">
                            {if condition="!is_null($id)"}

                            <input type="hidden" name="id" value="{$id}">
                            {/if}
                           
<div class="form-group required">
    <label class="col-sm-2 control-label" for="input-title">角色（权限）名称</label>
    <div class="col-sm-10">
        <input type="text" name="title" value="{$data['title']|default=''}" placeholder="角色（权限）名称"
               id="input-title" class="form-control"/>

        {if condition="isset($message['title'])"}
        <label class="text-danger" id="input-title-error" for="input-title">{$message['title']}</label>

        {else /}

        {/if}

    </div>
</div>
<div class="form-group required">
    <label class="col-sm-2 control-label" for="input-descrition">描述</label>
    <div class="col-sm-10">
        <input type="text" name="descrition" value="{$data['descrition']|default=''}" placeholder="描述"
               id="input-descrition" class="form-control"/>

        {if condition="isset($message['descrition'])"}
        <label class="text-danger" id="input-descrition-error" for="input-descrition">{$message['descrition']}</label>

        {else /}

        {/if}

    </div>
</div>
<div class="form-group ">
    <label class="col-sm-2 control-label" for="input-is_super">是否为超管</label>
    <div class="col-sm-10">
        <input type="text" name="is_super" value="{$data['is_super']|default=''}" placeholder="是否为超管"
               id="input-is_super" class="form-control"/>

        {if condition="isset($message['is_super'])"}
        <label class="text-danger" id="input-is_super-error" for="input-is_super">{$message['is_super']}</label>

        {else /}

        {/if}

    </div>
</div>
<div class="form-group ">
    <label class="col-sm-2 control-label" for="input-sort">排序</label>
    <div class="col-sm-10">
        <input type="text" name="sort" value="{$data['sort']|default=''}" placeholder="排序"
               id="input-sort" class="form-control"/>

        {if condition="isset($message['sort'])"}
        <label class="text-danger" id="input-sort-error" for="input-sort">{$message['sort']}</label>

        {else /}

        {/if}

    </div>
</div>

                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{/block}





